/***********************************************************************************
    Filename: hal_mcu.h

    Copyright 2007 Texas Instruments, Inc.
***********************************************************************************/

#ifndef  __HAL_MCU_H__
#define  __HAL_MCU_H__

#ifdef __cplusplus
extern "C" {
#endif

#include "Typedef.h"
#include "board.h"
  
#define _delay_us(x)  __delay_cycles(CPU_OSC/100*x/10000)
#define _delay_ms(x)  __delay_cycles(CPU_OSC/100*x/10)

#define  DELAY_US(x)    _delay_us(x)
#define  DELAY_MS(x)    _delay_ms(x)
  
#define  halMcuWaitUs(x)   _delay_us(x)  

//----------------------------------------------------------------------------------
// Function declarations
//----------------------------------------------------------------------------------

void halMcuInit(void);
void halMcuSetLowPowerMode(INT8U mode);

#ifdef  __cplusplus
}
#endif

/**********************************************************************************/
#endif
